package com.hsjk.szwj.module.pay.mq.delayed;

import com.hsjk.szwj.framework.mq.core.listener.RedisDelayedQueueListener;
import com.hsjk.szwj.module.pay.dal.dataobject.config.PayOrderDivisionMQ;
import com.hsjk.szwj.module.pay.mq.producer.PayOrderDivisionProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author chenjiawei
 * @desc 支付订单分账延时处理
 * @Date 2023/09/04 11:30
 **/
@Component
@Slf4j
public class PayOrderDivisionListener implements RedisDelayedQueueListener<PayOrderDivisionMQ> {
    @Resource
    private PayOrderDivisionProducer payOrderDivisionProducer;

    @Override
    public void invoke(PayOrderDivisionMQ payOrderDivisionMQ) {
        log.info("订单通知延迟队列监听:{}", payOrderDivisionMQ);
        payOrderDivisionProducer.sendMessage(payOrderDivisionMQ);
    }
}
